<?php
$this->breadcrumbs = array(
    $model->label(2) => array('index'),
    GxHtml::valueEx($model),
);

$this->menu = array(
    array('label' => Yii::t('app', 'Manage') . ' ' . $model->label(2), 'url' => array('admin')),
);
?>

<h3><?php echo Yii::t('app', 'View') . ' ' . GxHtml::encode($model->label()); ?></h3>

<?php
$this->widget('zii.widgets.CDetailView', array(
    'data' => $model,
    'attributes' => array(
        array
            (
            'name' => 'First name',
            'Header'=>'First name',
            'value' => PurchaseOrder::getUsersName($model->users_id),
        ),
        'total_price',
        'order_date_time',
    ),
));
$purachgeOrderDetails = PurchaseClassCourse::model()->findAllByAttributes(array('purchaseorder_id' => $model->id));
if (!empty($purachgeOrderDetails)) {
    foreach ($purachgeOrderDetails as $purachgeOrderDetail) {
        ?>

        <table class="detail-view" id="yw0"><tbody>
                <tr class="odd"><th>Class Name</th><td><?php echo getClassName($purachgeOrderDetail->classes_id); ?></td></tr>
                <tr class="even"><th>Batch Start Date</th><td><?php echo $purachgeOrderDetail->batch_start_date; ?> </td></tr>
                <tr class="odd"><th>Batch Start Time</th><td><?php echo $purachgeOrderDetail->batch_start_time; ?></td></tr>
                <tr class="even"><th>Batch Seats</th><td><?php echo $purachgeOrderDetail->batch_seats; ?></td></tr>
                <tr class="odd"><th>Venue deatils</th><td><?php echo $purachgeOrderDetail->venue_deatils; ?></td></tr>
            </tbody></table>
    <?php }
} ?>